{include file="public/mobileheader"}
<style>
    body{
        padding-top: 45px;
    }
    .form-center{
        text-align: center;
        padding-top: 3em;
    }
    .mui-btn-block{
        padding: 7px 0;
    }
</style>

    <body>
        <header class="mui-bar mui-bar-nav">
            <a onclick="window.history.go(-1)" class="mui-icon mui-icon-left-nav mui-pull-left"></a>
            <h1 class="mui-title">代理商订货</h1>
        </header>

        <form class="form-center">
            <div>
                <p>您目前拥有激活码：<span style="color: #5588aa;">{$total_key}</span>（个）</p>
                <p>已被激活的激活码有：<span style="color: #5588aa;">{$is_active}</span>（个）</p>
            </div>
            <div>
                <span>输入需要订购激活码的数量</span>
                <input type="text" name="num" placeholder="请输入数量"/>
            </div>

            <button type="button" id="purchase" class="mui-btn mui-btn-success mui-btn-block">立即预定</button>
        </form>


    {include file="public/nav"}
    </body>

{include file="public/mobilefooter"}
    <script>
        $('#purchase').click(function() {
            var params  = {
                url : "{:url('agentOrder')}",
                data: $('form').serialize(),
                type: 'post',
                sCallback:function(res){
                    dialog.success(res.msg);
                }
            };
            common.request(params);
        });
    </script>

</html>